package com.loveofsoftware.fotolab.effects;

import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;

public class TranslucentInitialEffect implements InitialEffects {

	public Bitmap transform(Bitmap in) {
		int [] pixels = new int[in.getWidth() * in.getHeight()];
		
		in = in.copy(Config.ARGB_8888, true);
		in.getPixels(pixels, 0, in.getWidth(), 0, 0, in
				.getWidth(), in.getHeight());
		for (int i = 0; i < pixels.length; i++) {
			pixels[i] &= 0x4fffffff;
		}
		in.setPixels(pixels, 0, in.getWidth(), 0, 0, in.getWidth(), in.getHeight());
		return in;
	}

}
